<script src="public/magiczoomplus/magiczoomplus.js" type="text/javascript"></script>
<link href="public/magiczoomplus/magiczoomplus.css" rel="stylesheet" type="text/css" media="screen"/>
<div id="sanpham_right">
	<div id="title_right">
		<p id="title_right_left"></p>
		<div id="title_right_center">
			<p class="chu_title">KẾT QUẢ TÌM KIẾM</p>
		</div>
		<p id="title_right_right"></p>
	</div>
	<div id="noidung_right">
		<!-- san pham 1 -->
		
	<?php 
	if(isset($data['listlh']))
	{
		foreach($data['listlh'] as $lh)
		{
	
	if(isset($data['listmh']))
	{
		foreach($data['listmh'] as $item)
		{
		if($lh['MaLH']==$item['MaLH'])
		{
		?>
		<div id="sanpham">
			<p align="center">
				<a href="public/upload/<?php echo $item['HinhAnh'];?>" class="MagicZoomPlus" rel="zoom-position: right; zoom-height: 300px;"><img
					src="public/upload/<?php echo $item['HinhAnh'];?>" width="100px"  /></a>
			</p>
			<p class="ten_sp">
				<a href="index.php?mod=detail&id=<?php echo $item['MaMH'];?>"><?php echo $item['TenMH'];?>
				</a>
			</p>
			<p class="gia_sp">
			<?php echo number_format($item['Gia']);?>
				VNĐ
			</p>
			<a href="index.php?mod=dathang&id=<?php echo $item['MaMH'];?>&tenmh=<?php echo $item['TenMH'];?>&gia=<?php echo $item['Gia'];?>">
			<img src="public/hinhanh/mua1.jpg" align="middle" style="margin-left: 30px;margin-bottom: 10px"></a>
			<a href="index.php?mod=detail&id=<?php echo $item['MaMH'];?>">
			<img src="public/hinhanh/xem1.jpg" align="middle" style="margin-right: 10px;margin-bottom: 10px"></a>
		</div>
		<?php
		}
		}
	}
		}

	
	}elseif($data['listmhag']) {
	foreach ($data['listmhag'] as $mathang)
	{?>
		<div id="sanpham">
			<p align="center">
				<a href="public/upload/<?php echo $mathang['HinhAnh'];?>" class="MagicZoomPlus" rel="zoom-position: right; zoom-height: 300px;"><img
					src="public/upload/<?php echo $mathang['HinhAnh'];?>" width="100px"  /></a>
			</p>
			<p class="ten_sp">
				<a href="index.php?mod=detail&id=<?php echo $mathang['MaMH'];?>"><?php echo $mathang['TenMH'];?>
				</a>
			</p>
			<p class="gia_sp">
			<?php echo number_format($mathang['Gia']);?>
				VNĐ
			</p>
			<a href="index.php?mod=dathang&id=<?php echo $mathang['MaMH'];?>&tenmh=<?php echo $mathang['TenMH'];?>&gia=<?php echo $mathang['Gia'];?>">
			<img src="public/hinhanh/mua1.jpg" align="middle" style="margin-left: 30px;margin-bottom: 10px"></a>
			<a href="index.php?mod=detail&id=<?php echo $mathang['MaMH'];?>">
			<img src="public/hinhanh/xem1.jpg" align="middle" style="margin-right: 10px;margin-bottom: 10px"></a>
		</div>
		
	<?php }
	?>
	
<?php }else{
 echo "Không tìm thấy !";
}

	?>	
	</div>
	</div>